﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DevExpress.XtraEditors;

namespace GUI
{
    public partial class Form_CapNhatThamSo : Form_CapNhatThamSoBase
    {
        public Form_CapNhatThamSo()
        {
            InitializeComponent();
            Init();
        }
        public override void Init()
        {
            btnThem = new SimpleButton();
            btnXoa = new SimpleButton();
            btnClear = new SimpleButton();
            _grid = grid_ThamSo;
            btnSua = btn_Sua;
            

            base.Init();
        }
        public override void SetData(ThamSo obj)
        {
            txt_TenTS.Text = obj.TenTS;
            txt_GiaTri.EditValue = obj.GiaTri;   
        }
        public override void GetData(ref ThamSo obj)
        {
            obj.TenTS = txt_TenTS.Text;
            obj.GiaTri = Utils.ToFloat(txt_GiaTri.EditValue);
        }
    }
    public class Form_CapNhatThamSoBase : ucBase<ThamSo, ThamSoBUS>
    {
    }
}
